import pandas as pd
import matplotlib.pyplot as plt
import plotly.express as px
x=pd.read_csv('shopify1.csv')
x
| order_id | shop_id | user_id | order_amount | total_items | payment_method | created_at | |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 53 | 746 | 224 | 2 | cash | 13/03/2017 12:36 |
| 1 | 2 | 92 | 925 | 90 | 1 | cash | 03/03/2017 17:38 |
| 2 | 3 | 44 | 861 | 144 | 1 | cash | 14/03/2017 04:23 |
| 3 | 4 | 18 | 935 | 156 | 1 | credit_card | 26/03/2017 12:43 |
| 4 | 5 | 18 | 883 | 156 | 1 | credit_card | 01/03/2017 04:35 |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 4995 | 4996 | 73 | 993 | 330 | 2 | debit | 30/03/2017 13:47 |
| 4996 | 4997 | 48 | 789 | 234 | 2 | cash | 16/03/2017 20:36 |
| 4997 | 4998 | 56 | 867 | 351 | 3 | cash | 19/03/2017 05:42 |
| 4998 | 4999 | 60 | 825 | 354 | 2 | credit_card | 16/03/2017 14:51 |
| 4999 | 5000 | 44 | 734 | 288 | 2 | debit | 18/03/2017 15:48 |
5000 rows × 7 columns
z=x['order_amount'].mean()
z
y=x['order_amount']
px.line(x,x='payment_method',y='order_amount')
px.bar(x, x="payment_method", y="order_amount", color="payment_method")
AS you can see the major transaction are done in credit card for the sneakers. Also some people might not have credit card as they have debit card or cash sales might be less because of this. We could add options for debit based emi for increasing sales.